﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITCellRepository : IBaseRepository<TCell>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool AddTcell(TCellDto obj,out string message);

        /// <summary>
        /// 仓位左侧树形显示
        /// </summary>
        /// <returns></returns>
        List<Menuitem> GetMenuitem();

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool UpdateTcell(TCellDto obj, out string message);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        bool DelTcell(int uid);

        /// <summary>
        /// 获取库房
        /// </summary>
        /// <returns></returns>
        List<TWarehouse> GetTwarehouseList();

        /// <summary>
        /// 根据id获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TCell GetTcellById(int id);

        bool UpdateSetUp(Tcellll obj);

        /// <summary>
        /// 获取货架
        /// </summary>
        /// <returns></returns>
        List<Menuitem> GetWarAreaShellList();

        /// <summary>
        /// 列表显示
        /// </summary>
        /// <param name="logicalPartCode"></param>
        /// <param name="fullStatus"></param>
        /// <param name="status"></param>
        /// <param name="cname"></param>
        /// <param name="whid"></param>
        /// <param name="areid"></param>
        /// <param name="sheid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TCell> GetCellList(string logicalPartCode, int fullStatus, int status, string cname, int whid, int areid, int sheid, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 获取全部
        /// </summary>
        /// <returns></returns>
        List<TCell> GetAllCellList();

        /// <summary>
        /// 批量添加仓位
        /// </summary>
        /// <param name="cellCreateBodyDTO"></param>
        /// <returns></returns>
        bool BatchCreateCell(CellCreateBodyDTO cellCreateBodyDTO,out string message);

        TCell AllocateCell(int materialKeyId, int? qualityState, int heightType, out string errorMsg, string logicalPartCode = "");
    }
}